package editor.windows;

import java.text.NumberFormat;
import java.util.ArrayList;

import adventure.placeable.Mobile;
import adventure.placeable.MobileEdit;
import adventure.placeable.PlaceableManager;
import adventure.placeable.PlaceableManagerEdit;

/**
 *
 * @author Michael Hanns
 * 
 */
public class EditorMobileView extends javax.swing.JDialog {

    private static final long serialVersionUID = -1771597280141203470L;
    private PlaceableManager placeables;
    private int totalMobiles;
    private WITNAFrameView parent;

    /**
     * Creates new form EditorItemView
     */
    public EditorMobileView(java.awt.Frame parent, PlaceableManager p) {
        super(parent, true);
        placeables = p;
        this.parent = (WITNAFrameView) parent;
        initComponents();
        if (placeables.getMobile(1).getID() == 0) {
            ((PlaceableManagerEdit) placeables).newMobile();
        }
        fillTable();
        fillItemsCombo();
        getMobileData(totalMobiles - 1);
    }

     public void fillItemsCombo() {
        for (int x = 1; placeables.getItem(x).getID() > 0; x++) {
            itemsCombo.addItem(placeables.getItem(x).getID() + ":"
                    + placeables.getItem(x).getName());
        }
    }

    public void fillTable() {
        mobileListTable.removeAll();

        int x = 1;
        while (placeables.getMobile(x).getID() != 0) {
            mobileListTable.getModel().setValueAt(placeables.getMobile(x).getID(), x - 1, 0);
            mobileListTable.getModel().setValueAt(((MobileEdit) placeables.getMobile(x)).getAliveName(), x - 1, 1);
            x++;
        }

        totalMobiles = x;

        mobileListTable.changeSelection(x - 1, 2, false, false);
    }

    public void getMobileData(int row) {
        if (row > 0) {

            Mobile mob = placeables.getMobile(row);

            idBox.setText("" + mob.getID());
            nameBox.setText(((MobileEdit) mob).getAliveName());
            descriptionBox.setText(((MobileEdit) mob).getAliveDescription());
            levelBox.setText("" + mob.getLevel());
            attackBox.setText("" + mob.getAttack());
            defBox.setText("" + mob.getDefence());
            speedBox.setText("" + mob.getSpeed());
            luckBox.setText("" + mob.getLuck());
            hpBox.setText("" + mob.getMaxHealth());
            deadBox.setSelected(mob.isDead());
            immortalBox.setSelected(mob.isImmortal());
            setImmortalStatus(mob.isImmortal());
            vendorModBox.setText("" + mob.getVendorModifier());
            vendorBox.setSelected(mob.isVendor());
            setVendorStatus(mob.isVendor());
            aggroBox.setSelected(mob.isAggro());
            lightSourceBox.setSelected(mob.isLightSource());
            visibleBox.setSelected(mob.isVisible());
            goldBox.setText("" + mob.getCurrencyContents());


            inventoryList.removeAll();
            int x = 0;
            while (placeables.getMobile(row).getInventoryItem(x).getID() > 0) {
                x++;
            }
            String[] listData = new String[x];
            for (int y = 0; y < x; y++) {
                listData[y] = placeables.getMobile(row).getInventoryItem(y).getID()
                        + ":" + placeables.getMobile(row).getInventoryItem(y).getName();
            }
            inventoryList.setListData(listData);
        }
    }

    private void setVendorStatus(boolean vendor) {
        vendorModBox.setEnabled(vendor);
        if (!vendor) {
            vendorModBox.setText("");
        } else {
            vendorModBox.setText(placeables.getMobile(Integer.parseInt(idBox.getText())).getVendorModifier() + "");
        }
    }

    private void setImmortalStatus(boolean immortal) {
        deadBox.setEnabled(!immortal);
        if (immortal) {
            deadBox.setSelected(false);
        }
    }

    private void addItem(String itemName) {
        String[] listItems = new String[inventoryList.getModel().getSize() + 1];
        for (int x = 0; x < inventoryList.getModel().getSize(); x++) {
            listItems[x] = inventoryList.getModel().getElementAt(x).toString();
        }
        listItems[inventoryList.getModel().getSize()] = itemName;
        System.out.println(listItems[0]);
        inventoryList.setListData(listItems);
    }

    private void dropItem(int selectedPosition) {
        ArrayList<String> listData = new ArrayList<String>();
        for (int x = 0; x < inventoryList.getModel().getSize(); x++) {
            if (x != selectedPosition) {
                listData.add(inventoryList.getModel().getElementAt(x).toString());
            }
        }
        String[] newData = new String[listData.size()];
        for (int x = 0; x < listData.size(); x++) {
            newData[x] = listData.get(x);
        }
        inventoryList.setListData(newData);
    }

    private void moveItemUp(int selectedPosition) {
        if (selectedPosition > 0) {
            ArrayList<String> listData = new ArrayList<String>();
            for (int x = 0; x < inventoryList.getModel().getSize(); x++) {
                if (x == selectedPosition - 1) {
                    listData.add(inventoryList.getModel().getElementAt(selectedPosition).toString());
                } else if (x == selectedPosition) {
                    listData.add(inventoryList.getModel().getElementAt(selectedPosition - 1).toString());
                } else {
                    listData.add(inventoryList.getModel().getElementAt(x).toString());
                }
            }
            String[] newData = new String[listData.size()];
            for (int x = 0; x < listData.size(); x++) {
                newData[x] = listData.get(x);
            }
            inventoryList.setListData(newData);
            inventoryList.setSelectedIndex(selectedPosition - 1);
        }
    }

    private void moveItemDown(int selectedPosition) {
        if (selectedPosition + 1 < inventoryList.getModel().getSize()) {
            ArrayList<String> listData = new ArrayList<String>();
            for (int x = 0; x < inventoryList.getModel().getSize(); x++) {
                if (x == selectedPosition) {
                    listData.add(inventoryList.getModel().getElementAt(selectedPosition + 1).toString());
                } else if (x == selectedPosition + 1) {
                    listData.add(inventoryList.getModel().getElementAt(selectedPosition).toString());
                } else {
                    listData.add(inventoryList.getModel().getElementAt(x).toString());
                }
            }

            String[] newData = new String[listData.size()];
            for (int x = 0; x < listData.size(); x++) {
                newData[x] = listData.get(x);
            }
            inventoryList.setListData(newData);
            inventoryList.setSelectedIndex(selectedPosition + 1);
        }
    }

    private void newMobile() {
        if (totalMobiles <= 200) {
            if (placeables.getMobile(totalMobiles - 1).getName().trim().length() == 0) {
                parent.printToConsole("You must specify a name for all existing mobiles before creating a new one!");
            } else {
                ((PlaceableManagerEdit) placeables).newMobile();
                fillTable();
                getMobileData(totalMobiles - 1);
            }
        } else {
            parent.printToConsole("You have reached the maximum number of mobiles!");
        }
    }

    private void duplicateMobile(int id) {
        if (totalMobiles <= 200) {
            if (placeables.getMobile(totalMobiles - 1).getName().trim().length() == 0) {
                parent.printToConsole("You must specify a name for all existing mobiles before duplicating one!");
            } else {
                if (id > 0) {
                    System.out.println("id > 0");
                    if (placeables.getMobile(id).getID() != 0) {
                        MobileEdit newMobile = (MobileEdit) placeables.getMobile(id).cloneThis();
                        newMobile.setID(totalMobiles);
                        ((PlaceableManagerEdit) placeables).newMobile(newMobile);
                        fillTable();
                        getMobileData(totalMobiles - 1);
                    } else {
                        parent.printToConsole("You must select an existing mobile before attempting to duplicate!");
                    }
                }
            }
        } else {
            parent.printToConsole("You have reached the maximum number of mobiles!");
        }
    }

    private void applyChanges(int id, String name) {
        if (id > 0 && name.length() > 0) {

            if (placeables.getMobile(id).getID() > 0) {

                String description = descriptionBox.getText();

                int level = Integer.parseInt(levelBox.getText());

                int hp = Integer.parseInt(hpBox.getText());

                int atk = Integer.parseInt(attackBox.getText());
                int def = Integer.parseInt(defBox.getText());
                int spd = Integer.parseInt(speedBox.getText());
                int lck = Integer.parseInt(luckBox.getText());
                int gold = Integer.parseInt(goldBox.getText());

                boolean aggro = aggroBox.isSelected();
                boolean visible = visibleBox.isSelected();
                boolean light = lightSourceBox.isSelected();
                boolean dead = deadBox.isSelected();
                boolean vendor = vendorBox.isSelected();
                double vendorMod = 0;
                if (vendor) {
                    vendorMod = Double.parseDouble(vendorModBox.getText());
                }
                boolean immortal = immortalBox.isSelected();



                // Fill inventory..
                ArrayList<Integer> inven = new ArrayList<Integer>();

                for (int x = 0; x < inventoryList.getModel().getSize(); x++) {
                    String item = inventoryList.getModel().getElementAt(x).toString();
                    int colPos = 0;
                    System.out.println(item);
                    while (item.charAt(colPos) != ':') {
                        colPos++;
                    }
                    System.out.println(item.substring(0, colPos));
                    int itemID = Integer.parseInt(item.substring(0, colPos));
                    inven.add(itemID);
                }

                ((PlaceableManagerEdit) placeables).editMobile(id, "NAME", name);
                ((PlaceableManagerEdit) placeables).editMobile(id, "DESCRIPTION", description);
                ((PlaceableManagerEdit) placeables).editMobile(id, "LEVEL", level);
                ((PlaceableManagerEdit) placeables).editMobile(id, "MAXHEALTH", hp);
                ((PlaceableManagerEdit) placeables).editMobile(id, "ATTACK", atk);
                ((PlaceableManagerEdit) placeables).editMobile(id, "DEFENCE", def);
                ((PlaceableManagerEdit) placeables).editMobile(id, "SPEED", spd);
                ((PlaceableManagerEdit) placeables).editMobile(id, "LUCK", lck);
                ((PlaceableManagerEdit) placeables).editMobile(id, "GOLD", gold);
                ((PlaceableManagerEdit) placeables).editMobile(id, "AGGRO", aggro);
                ((PlaceableManagerEdit) placeables).editMobile(id, "VISIBLE", visible);
                ((PlaceableManagerEdit) placeables).editMobile(id, "LIGHTSOURCE", light);
                ((PlaceableManagerEdit) placeables).editMobile(id, "DEAD", dead);
                ((PlaceableManagerEdit) placeables).editMobile(id, "IMMORTAL", immortal);
                ((PlaceableManagerEdit) placeables).editMobile(id, "VENDOR", vendor);
                ((PlaceableManagerEdit) placeables).editMobile(id, "VENDORMOD", vendorMod);
                ((PlaceableManagerEdit) placeables).editMobile(id, "REMOVEITEMS", true);

                for (int x = 0; x < inven.size(); x++) {
                    ((PlaceableManagerEdit) placeables).editMobile(id, "ADDITEM", inven.get(x));
                }


                fillTable();
                parent.setUnsavedChanges(true);

                parent.printToConsole("Mobile " + name + " updated.");
                getMobileData(id);
            } else {
                parent.printToConsole("You must select an existing mobile before applying changes!");
            }
        } else {
            parent.printToConsole("WARNING: Mobile changes not saved. You must specify a name for the mobile!");

        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane2 = new javax.swing.JScrollPane();
        jList1 = new javax.swing.JList();
        mobileListPane = new javax.swing.JScrollPane();
        mobileListTable = new javax.swing.JTable();
        nameBox = new javax.swing.JFormattedTextField();
        idBox = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
        jScrollPane1 = new javax.swing.JScrollPane();
        descriptionBox = new javax.swing.JTextPane();
        idLabel = new javax.swing.JLabel();
        nameLabel = new javax.swing.JLabel();
        descriptionLabel = new javax.swing.JLabel();
        closeButton = new javax.swing.JButton();
        newMobileButton = new javax.swing.JButton();
        applyButton = new javax.swing.JButton();
        duplicateButton = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        levelLabel3 = new javax.swing.JLabel();
        attackBox = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
        totalUsesLabel3 = new javax.swing.JLabel();
        levelLabel4 = new javax.swing.JLabel();
        totalUsesLabel4 = new javax.swing.JLabel();
        levelBox = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
        hpBox = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
        totalUsesLabel5 = new javax.swing.JLabel();
        defBox = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
        speedBox = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
        levelLabel5 = new javax.swing.JLabel();
        luckBox = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
        statusPanel = new javax.swing.JPanel();
        vendorBox = new javax.swing.JCheckBox();
        visibleBox = new javax.swing.JCheckBox();
        lightSourceBox = new javax.swing.JCheckBox();
        deadBox = new javax.swing.JCheckBox();
        aggroBox = new javax.swing.JCheckBox();
        immortalBox = new javax.swing.JCheckBox();
        inventoryPanel = new javax.swing.JPanel();
        dropButton = new javax.swing.JButton();
        inventoryLabel = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        inventoryList = new javax.swing.JList();
        addItemLabel = new javax.swing.JLabel();
        itemsCombo = new javax.swing.JComboBox();
        addItemButton = new javax.swing.JButton();
        goldLabel = new javax.swing.JLabel();
        goldBox = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
        vendorModLabel = new javax.swing.JLabel();
        vendorModBox = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
        moveItemUpButton = new javax.swing.JButton();
        moveItemDownButton = new javax.swing.JButton();

        jList1.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane2.setViewportView(jList1);

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Edit Mobiles");
        setAlwaysOnTop(true);
        setLocationByPlatform(true);
        setResizable(false);

        mobileListTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "#", "Name"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        mobileListTable.setToolTipText("Mobile list");
        mobileListTable.setColumnSelectionAllowed(true);
        mobileListTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        mobileListTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mobileListTableMouseClicked(evt);
            }
        });
        mobileListPane.setViewportView(mobileListTable);
        mobileListTable.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        mobileListTable.getColumnModel().getColumn(0).setMinWidth(10);
        mobileListTable.getColumnModel().getColumn(0).setPreferredWidth(25);
        mobileListTable.getColumnModel().getColumn(0).setMaxWidth(25);

        nameBox.setToolTipText("Mobile name");

        idBox.setEditable(false);
        idBox.setToolTipText("Mobile number");

        descriptionBox.setToolTipText("Mobile description");
        jScrollPane1.setViewportView(descriptionBox);

        idLabel.setText("ID:");

        nameLabel.setText("Name:");

        descriptionLabel.setText("Description:");

        closeButton.setText("Close");
        closeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closeButtonActionPerformed(evt);
            }
        });

        newMobileButton.setText("Add new..");
        newMobileButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newMobileButtonActionPerformed(evt);
            }
        });

        applyButton.setText("Apply");
        applyButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                applyButtonActionPerformed(evt);
            }
        });

        duplicateButton.setText("Duplicate");
        duplicateButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                duplicateButtonActionPerformed(evt);
            }
        });

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Statistics:"));

        levelLabel3.setText("Attack:");

        attackBox.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("###0"))));

        totalUsesLabel3.setText("Defence:");

        levelLabel4.setText("Level:");

        totalUsesLabel4.setText("Health:");

        levelBox.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("###0"))));

        hpBox.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("###0"))));

        totalUsesLabel5.setText("Luck:");

        defBox.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("###0"))));

        speedBox.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("###0"))));

        levelLabel5.setText("Speed:");

        luckBox.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("###0"))));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(levelLabel3)
                    .addComponent(levelLabel4)
                    .addComponent(totalUsesLabel3))
                .addGap(4, 4, 4)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(levelBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)
                    .addComponent(attackBox, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(defBox))
                .addGap(12, 12, 12)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(totalUsesLabel5)
                    .addComponent(levelLabel5)
                    .addComponent(totalUsesLabel4, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(hpBox, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)
                    .addComponent(speedBox)
                    .addComponent(luckBox, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(10, 10, 10))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(levelLabel4)
                    .addComponent(levelBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(totalUsesLabel4)
                    .addComponent(hpBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(attackBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(levelLabel3)
                    .addComponent(levelLabel5)
                    .addComponent(luckBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(speedBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(totalUsesLabel3)
                        .addComponent(defBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(totalUsesLabel5)))
                .addGap(0, 10, Short.MAX_VALUE))
        );

        statusPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Status:"));

        vendorBox.setText("Vendor");
        vendorBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                vendorBoxActionPerformed(evt);
            }
        });

        visibleBox.setText("Visible");
        visibleBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                visibleBoxActionPerformed(evt);
            }
        });

        lightSourceBox.setText("Light Source");

        deadBox.setText("Dead");
        deadBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deadBoxActionPerformed(evt);
            }
        });
        deadBox.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                deadBoxPropertyChange(evt);
            }
        });

        aggroBox.setText("Aggro");
        aggroBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                aggroBoxActionPerformed(evt);
            }
        });

        immortalBox.setText("Immortal");
        immortalBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                immortalBoxActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(visibleBox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lightSourceBox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(aggroBox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(vendorBox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(immortalBox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(deadBox, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(immortalBox)
                    .addComponent(visibleBox))
                .addGap(6, 6, 6)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(deadBox)
                    .addComponent(lightSourceBox))
                .addGap(6, 6, 6)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(vendorBox)
                    .addComponent(aggroBox))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        inventoryPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Inventory:"));

        dropButton.setText("Remove");
        dropButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
        dropButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dropButtonActionPerformed(evt);
            }
        });

        inventoryLabel.setText("Items:");

        jScrollPane3.setViewportView(inventoryList);

        addItemLabel.setText("Add item:");

        itemsCombo.setToolTipText("Doors item unlocks");

        addItemButton.setText("Add");
        addItemButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addItemButtonActionPerformed(evt);
            }
        });

        goldLabel.setText("Currency:");

        goldBox.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("###0"))));

        vendorModLabel.setText("Profit %:");
        vendorModLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        vendorModBox.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));

        moveItemUpButton.setText("▲");
        moveItemUpButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                moveItemUpButtonActionPerformed(evt);
            }
        });

        moveItemDownButton.setText("▼");
        moveItemDownButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                moveItemDownButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout inventoryPanelLayout = new javax.swing.GroupLayout(inventoryPanel);
        inventoryPanel.setLayout(inventoryPanelLayout);
        inventoryPanelLayout.setHorizontalGroup(
            inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(inventoryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(inventoryPanelLayout.createSequentialGroup()
                        .addGroup(inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(inventoryPanelLayout.createSequentialGroup()
                                .addComponent(moveItemUpButton)
                                .addGap(5, 5, 5)
                                .addComponent(moveItemDownButton)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(dropButton, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jScrollPane3)
                            .addGroup(inventoryPanelLayout.createSequentialGroup()
                                .addGroup(inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(inventoryLabel)
                                    .addComponent(addItemLabel))
                                .addGap(0, 0, Short.MAX_VALUE)))
                        .addGap(16, 16, 16)
                        .addGroup(inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(goldLabel)
                            .addComponent(vendorModLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(vendorModBox, javax.swing.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE)
                            .addComponent(goldBox)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, inventoryPanelLayout.createSequentialGroup()
                        .addComponent(itemsCombo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(addItemButton)))
                .addContainerGap())
        );
        inventoryPanelLayout.setVerticalGroup(
            inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(inventoryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(inventoryLabel)
                .addGap(6, 6, 6)
                .addGroup(inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(inventoryPanelLayout.createSequentialGroup()
                        .addGroup(inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(goldLabel)
                            .addComponent(goldBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(6, 6, 6)
                        .addGroup(inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(vendorModLabel)
                            .addComponent(vendorModBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(dropButton)
                    .addComponent(moveItemUpButton)
                    .addComponent(moveItemDownButton))
                .addGap(12, 12, 12)
                .addComponent(addItemLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(inventoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(itemsCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(addItemButton))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(mobileListPane, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(idLabel)
                            .addComponent(idBox, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(nameLabel)
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nameBox)
                                .addContainerGap())))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(newMobileButton)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(duplicateButton)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(closeButton)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(applyButton))
                            .addComponent(inventoryPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(descriptionLabel)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(statusPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addContainerGap())))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(mobileListPane, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(idLabel)
                            .addComponent(nameLabel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(nameBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(idBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(descriptionLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(statusPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(inventoryPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(newMobileButton)
                            .addComponent(applyButton)
                            .addComponent(closeButton)
                            .addComponent(duplicateButton))))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mobileListTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mobileListTableMouseClicked
        int row = mobileListTable.getSelectedRow();

        int id = Integer.parseInt(mobileListTable.getModel().getValueAt(row, 0).toString());

        getMobileData(id);
    }//GEN-LAST:event_mobileListTableMouseClicked

    private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
        dispose();
    }//GEN-LAST:event_closeButtonActionPerformed

    private void newMobileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newMobileButtonActionPerformed
        newMobile();
    }//GEN-LAST:event_newMobileButtonActionPerformed

    private void applyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_applyButtonActionPerformed
        int id = Integer.parseInt(idBox.getText());
        String name = nameBox.getText();

        applyChanges(id, name);
    }//GEN-LAST:event_applyButtonActionPerformed

    private void duplicateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_duplicateButtonActionPerformed
        int id = Integer.parseInt(idBox.getText());
        
        duplicateMobile(id);
    }//GEN-LAST:event_duplicateButtonActionPerformed

    private void vendorBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vendorBoxActionPerformed
        setVendorStatus(vendorBox.isSelected());
    }//GEN-LAST:event_vendorBoxActionPerformed

    private void visibleBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_visibleBoxActionPerformed

    }//GEN-LAST:event_visibleBoxActionPerformed

    private void deadBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deadBoxActionPerformed
        if (deadBox.isSelected()) {
            aggroBox.setSelected(false);
        }
    }//GEN-LAST:event_deadBoxActionPerformed

    private void deadBoxPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_deadBoxPropertyChange

    }//GEN-LAST:event_deadBoxPropertyChange

    private void aggroBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_aggroBoxActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_aggroBoxActionPerformed

    private void immortalBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_immortalBoxActionPerformed
        setImmortalStatus(immortalBox.isSelected());
    }//GEN-LAST:event_immortalBoxActionPerformed

    private void dropButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dropButtonActionPerformed
        if (!inventoryList.isSelectionEmpty()) {
            int selected = inventoryList.getSelectedIndex();
            dropItem(selected);
        }
    }//GEN-LAST:event_dropButtonActionPerformed

    private void addItemButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addItemButtonActionPerformed
        String item = itemsCombo.getSelectedItem().toString();

        addItem(item);
    }//GEN-LAST:event_addItemButtonActionPerformed

    private void moveItemUpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_moveItemUpButtonActionPerformed
        if (!inventoryList.isSelectionEmpty()) {
            int selected = inventoryList.getSelectedIndex();
            moveItemUp(selected);
        }
    }//GEN-LAST:event_moveItemUpButtonActionPerformed

    private void moveItemDownButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_moveItemDownButtonActionPerformed
        if (!inventoryList.isSelectionEmpty()) {
            int selected = inventoryList.getSelectedIndex();
            moveItemDown(selected);
        }
    }//GEN-LAST:event_moveItemDownButtonActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addItemButton;
    private javax.swing.JLabel addItemLabel;
    private javax.swing.JCheckBox aggroBox;
    private javax.swing.JButton applyButton;
    private javax.swing.JFormattedTextField attackBox;
    private javax.swing.JButton closeButton;
    private javax.swing.JCheckBox deadBox;
    private javax.swing.JFormattedTextField defBox;
    private javax.swing.JTextPane descriptionBox;
    private javax.swing.JLabel descriptionLabel;
    private javax.swing.JButton dropButton;
    private javax.swing.JButton duplicateButton;
    private javax.swing.JFormattedTextField goldBox;
    private javax.swing.JLabel goldLabel;
    private javax.swing.JFormattedTextField hpBox;
    private javax.swing.JFormattedTextField idBox;
    private javax.swing.JLabel idLabel;
    private javax.swing.JCheckBox immortalBox;
    private javax.swing.JLabel inventoryLabel;
    private javax.swing.JList inventoryList;
    private javax.swing.JPanel inventoryPanel;
    private javax.swing.JComboBox itemsCombo;
    private javax.swing.JList jList1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JFormattedTextField levelBox;
    private javax.swing.JLabel levelLabel3;
    private javax.swing.JLabel levelLabel4;
    private javax.swing.JLabel levelLabel5;
    private javax.swing.JCheckBox lightSourceBox;
    private javax.swing.JFormattedTextField luckBox;
    private javax.swing.JScrollPane mobileListPane;
    private javax.swing.JTable mobileListTable;
    private javax.swing.JButton moveItemDownButton;
    private javax.swing.JButton moveItemUpButton;
    private javax.swing.JFormattedTextField nameBox;
    private javax.swing.JLabel nameLabel;
    private javax.swing.JButton newMobileButton;
    private javax.swing.JFormattedTextField speedBox;
    private javax.swing.JPanel statusPanel;
    private javax.swing.JLabel totalUsesLabel3;
    private javax.swing.JLabel totalUsesLabel4;
    private javax.swing.JLabel totalUsesLabel5;
    private javax.swing.JCheckBox vendorBox;
    private javax.swing.JFormattedTextField vendorModBox;
    private javax.swing.JLabel vendorModLabel;
    private javax.swing.JCheckBox visibleBox;
    // End of variables declaration//GEN-END:variables
}
